home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2003 November A / PCWK1103A.iso / Adobe After Effects 6.0 tryout / MM5.Cab / F3669_MPS.dll.304FA6F7_2783_11D4_8520_00C04F602FD3 / PROC / ADOBE_COLORIMAGE_AI6 < prev    next >
Text File  |  2003-07-18  |  8KB  |  524 lines

  1. %%BeginProcSet: Adobe_ColorImage_AI6 2.0 0
  2. userdict /Adobe_ColorImage_AI6 known not
  3. {
  4.     userdict /Adobe_ColorImage_AI6 24 dict put 
  5. } if
  6. userdict /Adobe_ColorImage_AI6 get begin
  7.     
  8.     /initialize
  9.     {
  10.     } def
  11.     /initialize2
  12.     { 
  13.         Adobe_ColorImage_AI6 begin
  14.         Adobe_ColorImage_AI6
  15.         {
  16.             dup type /arraytype eq
  17.             {
  18.                 dup xcheck
  19.                 {
  20.                     bind
  21.                 } if
  22.             } if
  23.             pop pop
  24.         } forall
  25.     } def
  26.     /terminate { } def
  27.     /terminate2 { end } def
  28.     
  29.     currentdict /Adobe_ColorImage_AI6_Vars known not
  30.     {
  31.         /Adobe_ColorImage_AI6_Vars 15 dict def
  32.     } if
  33.     
  34.     Adobe_ColorImage_AI6_Vars begin
  35.         /channelcount 0 def
  36.         /sourcecount 0 def
  37.         /sourcearray 4 array def
  38.         /plateindex -1 def
  39.         /XIMask 0 def
  40.         /XIBinary 0 def
  41.         /XIChannelCount 0 def
  42.         /XIBitsPerPixel 0 def
  43.         /XIImageHeight 0 def
  44.         /XIImageWidth 0 def
  45.         /XIImageMatrix null def
  46.         /XIBuffer null def
  47.         /XIDataProc null def
  48.         /XIVersion 6 def
  49.  end
  50.     
  51.     /WalkRGBString null def
  52.     /WalkCMYKString null def
  53.     
  54.     /StuffRGBIntoGrayString null def
  55.     /RGBToGrayImageProc null def
  56.     /StuffCMYKIntoGrayString null def
  57.     /CMYKToGrayImageProc null def
  58.     /ColorImageCompositeEmulator null def
  59.     
  60.     /SeparateCMYKImageProc null def
  61.     
  62.     /FourEqual null def
  63.     /TestPlateIndex null def
  64.     
  65.     currentdict /_colorimage known not
  66.     {
  67.         /colorimage where
  68.         {
  69.             /colorimage get /_colorimage exch def
  70.         }
  71.         {
  72.             /_colorimage null def
  73.         } ifelse
  74.     } if
  75.     
  76.     /_currenttransfer systemdict /currenttransfer get def
  77.     
  78.     /colorimage null def
  79.     /XI null def
  80.     
  81.     
  82.     /WalkRGBString
  83.     {
  84.         0 3 index
  85.     
  86.         dup length 1 sub 0 3 3 -1 roll
  87.         {
  88.             3 getinterval { } forall
  89.     
  90.             5 index exec
  91.     
  92.             3 index
  93.         } for
  94.         
  95.          5 { pop } repeat
  96.     
  97.     } def
  98.     
  99.     
  100.     /WalkCMYKString
  101.     {
  102.         0 3 index
  103.     
  104.         dup length 1 sub 0 4 3 -1 roll
  105.         {
  106.             4 getinterval { } forall
  107.             
  108.             6 index exec
  109.             
  110.             3 index
  111.             
  112.         } for
  113.         
  114.         5 { pop } repeat
  115.         
  116.     } def
  117.     
  118.     
  119.     /StuffRGBIntoGrayString
  120.     {
  121.         .11 mul exch
  122.         
  123.         .59 mul add exch
  124.         
  125.         .3 mul add
  126.         
  127.         cvi 3 copy put
  128.         
  129.         pop 1 add
  130.     } def
  131.     
  132.     
  133.     /RGBToGrayImageProc
  134.     {    
  135.         Adobe_ColorImage_AI6_Vars begin 
  136.             sourcearray 0 get exec
  137.             dup length 3 idiv string
  138.             dup 3 1 roll 
  139.             
  140.             /StuffRGBIntoGrayString load exch
  141.             WalkRGBString
  142.      end
  143.     } def
  144.     
  145.     
  146.     /StuffCMYKIntoGrayString
  147.     {
  148.         exch .11 mul add
  149.         
  150.         exch .59 mul add
  151.         
  152.         exch .3 mul add
  153.         
  154.         dup 255 gt { pop 255 } if
  155.         
  156.         255 exch sub cvi 3 copy put
  157.         
  158.         pop 1 add
  159.     } def
  160.     
  161.     
  162.     /CMYKToGrayImageProc
  163.     {    
  164.         Adobe_ColorImage_AI6_Vars begin
  165.             sourcearray 0 get exec
  166.             dup length 4 idiv string
  167.             dup 3 1 roll 
  168.             
  169.             /StuffCMYKIntoGrayString load exch
  170.             WalkCMYKString
  171.      end
  172.     } def
  173.     
  174.     
  175.     /ColorImageCompositeEmulator
  176.     {
  177.         pop true eq
  178.         {
  179.             Adobe_ColorImage_AI6_Vars /sourcecount get 5 add { pop } repeat
  180.         }
  181.         {
  182.             Adobe_ColorImage_AI6_Vars /channelcount get 1 ne
  183.             {
  184.                 Adobe_ColorImage_AI6_Vars begin
  185.                     sourcearray 0 3 -1 roll put
  186.                 
  187.                     channelcount 3 eq 
  188.                     { 
  189.                         /RGBToGrayImageProc 
  190.                     }
  191.                     { 
  192.                         /CMYKToGrayImageProc
  193.                     } ifelse
  194.                     load
  195.              end
  196.             } if
  197.             image
  198.         } ifelse
  199.     } def
  200.     
  201.     
  202.     /SeparateCMYKImageProc
  203.     {    
  204.         Adobe_ColorImage_AI6_Vars begin
  205.     
  206.             sourcecount 0 ne
  207.             {
  208.                 sourcearray plateindex get exec
  209.             }
  210.             {            
  211.                 sourcearray 0 get exec
  212.                 
  213.                 dup length 4 idiv string
  214.                 
  215.                 0 2 index
  216.                 
  217.                 plateindex 4 2 index length 1 sub
  218.                 {
  219.                     get 255 exch sub
  220.                     
  221.                     3 copy put pop 1 add
  222.                     
  223.                     2 index
  224.                 } for
  225.     
  226.                 pop pop exch pop
  227.             } ifelse
  228.      end
  229.     } def
  230.         
  231.     
  232.     /FourEqual
  233.     {
  234.         4 index ne
  235.         {
  236.             pop pop pop false
  237.         }
  238.         {
  239.             4 index ne
  240.             {
  241.                 pop pop false
  242.             }
  243.             {
  244.                 4 index ne
  245.                 {
  246.                     pop false
  247.                 }
  248.                 {
  249.                     4 index eq
  250.                 } ifelse
  251.             } ifelse
  252.         } ifelse
  253.     } def
  254.     
  255.     
  256.     /TestPlateIndex
  257.     {
  258.         Adobe_ColorImage_AI6_Vars begin
  259.             /plateindex -1 def
  260.     
  261.             /setcmykcolor where
  262.             {
  263.                 pop
  264.                 gsave
  265.                 1 0 0 0 setcmykcolor systemdict /currentgray get exec 1 exch sub
  266.                 0 1 0 0 setcmykcolor systemdict /currentgray get exec 1 exch sub
  267.                 0 0 1 0 setcmykcolor systemdict /currentgray get exec 1 exch sub
  268.                 0 0 0 1 setcmykcolor systemdict /currentgray get exec 1 exch sub
  269.                 grestore
  270.     
  271.                 1 0 0 0 FourEqual 
  272.                 { 
  273.                     /plateindex 0 def
  274.                 }
  275.                 {
  276.                     0 1 0 0 FourEqual
  277.                     { 
  278.                         /plateindex 1 def
  279.                     }
  280.                     {
  281.                         0 0 1 0 FourEqual
  282.                         {
  283.                             /plateindex 2 def
  284.                         }
  285.                         {
  286.                             0 0 0 1 FourEqual
  287.                             { 
  288.                                 /plateindex 3 def
  289.                             }
  290.                             {
  291.                                 0 0 0 0 FourEqual
  292.                                 {
  293.                                     /plateindex 5 def
  294.                                 } if
  295.                             } ifelse
  296.                         } ifelse
  297.                     } ifelse
  298.                 } ifelse
  299.                 pop pop pop pop
  300.             } if
  301.             plateindex
  302.      end
  303.     } def
  304.     
  305.     
  306.     /colorimage
  307.     {
  308.         Adobe_ColorImage_AI6_Vars begin
  309.             /channelcount 1 index def
  310.             /sourcecount 2 index 1 eq { channelcount 1 sub } { 0 } ifelse def
  311.     
  312.             4 sourcecount add index dup 
  313.             8 eq exch 1 eq or not
  314.      end
  315.         
  316.         {
  317.             /_colorimage load null ne
  318.             {
  319.                 _colorimage
  320.             }
  321.             {
  322.                 Adobe_ColorImage_AI6_Vars /sourcecount get
  323.                 7 add { pop } repeat
  324.             } ifelse
  325.         }
  326.         {
  327.             dup 3 eq
  328.             TestPlateIndex
  329.             dup -1 eq exch 5 eq or or
  330.             {
  331.                 /_colorimage load null eq
  332.                 {
  333.                     ColorImageCompositeEmulator
  334.                 }
  335.                 {
  336.                     dup 1 eq
  337.                     {
  338.                         pop pop image
  339.                     }
  340.                     {
  341.                         Adobe_ColorImage_AI6_Vars /plateindex get 5 eq
  342.                         {
  343.                             gsave
  344.                             
  345.                             0 _currenttransfer exec
  346.                             1 _currenttransfer exec
  347.                             eq
  348.                             { 0 _currenttransfer exec 0.5 lt }
  349.                             { 0 _currenttransfer exec 1 _currenttransfer exec gt } ifelse
  350.                             
  351.                             { { pop 0 } } { { pop 1 } } ifelse
  352.                             systemdict /settransfer get exec
  353.                         } if
  354.                         
  355.                         _colorimage
  356.                         
  357.                         Adobe_ColorImage_AI6_Vars /plateindex get 5 eq
  358.                         {
  359.                             grestore
  360.                         } if
  361.                     } ifelse
  362.                 } ifelse
  363.             }
  364.             {
  365.                 dup 1 eq
  366.                 {
  367.                     pop pop
  368.                     image
  369.                 }
  370.                 {
  371.                     pop pop
  372.     
  373.                     Adobe_ColorImage_AI6_Vars begin
  374.                         sourcecount -1 0
  375.                         {            
  376.                             exch sourcearray 3 1 roll put
  377.                         } for
  378.     
  379.                         /SeparateCMYKImageProc load
  380.                  end
  381.     
  382.                     systemdict /image get exec
  383.                 } ifelse
  384.             } ifelse
  385.         } ifelse
  386.     } def
  387.     
  388.     /XG
  389.     {
  390.         pop pop
  391.     } def
  392.     
  393.     /XF
  394.     {
  395.         13 {pop} repeat
  396.     } def
  397.     
  398.     /Xh
  399.     {
  400.         Adobe_ColorImage_AI6_Vars begin
  401.             gsave
  402.             /XIMask exch 0 ne def
  403.             /XIImageHeight exch def
  404.             /XIImageWidth exch def
  405.             /XIImageMatrix exch def
  406.             0 0 moveto
  407.             XIImageMatrix concat
  408.             XIImageWidth XIImageHeight scale
  409.             
  410.             XIMask
  411.             {
  412.                 /_lp /null ddef
  413.                 _fc
  414.                 /_lp /imagemask ddef
  415.             }
  416.             if
  417.             /XIVersion 7 def
  418.      end
  419.     } def
  420.     
  421.     /XH
  422.     {
  423.         Adobe_ColorImage_AI6_Vars begin
  424.             /XIVersion 6 def
  425.             grestore
  426.      end
  427.     } def
  428.     
  429.     /OPIimage
  430.     {
  431.         Adobe_ColorImage_AI6_Vars begin
  432.             XIMask
  433.             {
  434.                 imagemask
  435.             }
  436.             {
  437.                 image
  438.             }
  439.             ifelse
  440.      end
  441.     } def
  442.     
  443.     /XI
  444.     {
  445.         Adobe_ColorImage_AI6_Vars begin
  446.             gsave
  447.             /XIMask exch 0 ne def
  448.             /XIBinary exch 0 ne def
  449.             pop
  450.             pop
  451.             /XIChannelCount exch def
  452.             /XIBitsPerPixel exch def
  453.             /XIImageHeight exch def
  454.             /XIImageWidth exch def
  455.             pop pop pop pop
  456.             /XIImageMatrix exch def
  457.             XIBitsPerPixel 1 eq
  458.             {
  459.                 XIImageWidth 8 div ceiling cvi
  460.             }
  461.             {
  462.                 XIImageWidth XIChannelCount mul
  463.             } ifelse
  464.             /XIBuffer exch string def
  465.             XIBinary
  466.             {
  467.                 /XIDataProc { currentfile XIBuffer readstring pop } def
  468.                 XIVersion 6 le
  469.                 {
  470.                     currentfile 128 string readline pop pop
  471.                 }
  472.                 if
  473.             }
  474.             {
  475.                 /XIDataProc { currentfile XIBuffer readhexstring pop } def
  476.             } ifelse
  477.             
  478.             XIVersion 6 le
  479.             {
  480.                 0 0 moveto
  481.                 XIImageMatrix concat
  482.                 XIImageWidth XIImageHeight scale
  483.                 XIMask
  484.                 {
  485.                     /_lp /null ddef
  486.                     _fc
  487.                     /_lp /imagemask ddef
  488.                 } if
  489.             } if
  490.             
  491.             XIMask
  492.             {
  493.                 XIImageWidth XIImageHeight
  494.                 false
  495.                 [ XIImageWidth 0 0 XIImageHeight neg 0 0 ]
  496.                 /XIDataProc load
  497.                 imagemask
  498.             }
  499.             {
  500.                 XIImageWidth XIImageHeight
  501.                 XIBitsPerPixel
  502.                 [ XIImageWidth 0 0 XIImageHeight neg 0 0 ]
  503.                 /XIDataProc load
  504.                 
  505.                 XIChannelCount 1 eq
  506.                 {
  507.                     gsave
  508.                     0 setgray
  509.                     image
  510.                     grestore
  511.                 }
  512.                 {
  513.                     false
  514.                     XIChannelCount
  515.                     colorimage
  516.                 } ifelse
  517.             } ifelse
  518.             grestore
  519.      end
  520.     } def
  521.     
  522. end
  523. %%EndProcSet
  524.